3.12 \(\int \frac{\sin ^2(a+b x)}{c+d x} \, dx\)

Optimal. Leaf size=78 \[ -\frac{\cos \left (2 a-\frac{2 b c}{d}\right ) \text{CosIntegral}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}+\frac{\sin \left (2 a-\frac{2 b c}{d}\right ) \text{Si}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}+\frac{\log (c+d x)}{2 d} \]

[Out]

-(Cos[2*a - (2*b*c)/d]*CosIntegral[(2*b*c)/d + 2*b*x])/(2*d) + Log[c + d*x]/(2*d) + (Sin[2*a - (2*b*c)/d]*SinI
ntegral[(2*b*c)/d + 2*b*x])/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.168239, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3312, 3303, 3299, 3302} \[ -\frac{\cos \left (2 a-\frac{2 b c}{d}\right ) \text{CosIntegral}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}+\frac{\sin \left (2 a-\frac{2 b c}{d}\right ) \text{Si}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}+\frac{\log (c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x]^2/(c + d*x),x]

[Out]

-(Cos[2*a - (2*b*c)/d]*CosIntegral[(2*b*c)/d + 2*b*x])/(2*d) + Log[c + d*x]/(2*d) + (Sin[2*a - (2*b*c)/d]*SinI
ntegral[(2*b*c)/d + 2*b*x])/(2*d)

Rule 3312

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Int[ExpandTrigReduce[(c + d*x)^m, Sin
[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1])
)

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{\sin ^2(a+b x)}{c+d x} \, dx &=\int \left (\frac{1}{2 (c+d x)}-\frac{\cos (2 a+2 b x)}{2 (c+d x)}\right ) \, dx\\ &=\frac{\log (c+d x)}{2 d}-\frac{1}{2} \int \frac{\cos (2 a+2 b x)}{c+d x} \, dx\\ &=\frac{\log (c+d x)}{2 d}-\frac{1}{2} \cos \left (2 a-\frac{2 b c}{d}\right ) \int \frac{\cos \left (\frac{2 b c}{d}+2 b x\right )}{c+d x} \, dx+\frac{1}{2} \sin \left (2 a-\frac{2 b c}{d}\right ) \int \frac{\sin \left (\frac{2 b c}{d}+2 b x\right )}{c+d x} \, dx\\ &=-\frac{\cos \left (2 a-\frac{2 b c}{d}\right ) \text{Ci}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}+\frac{\log (c+d x)}{2 d}+\frac{\sin \left (2 a-\frac{2 b c}{d}\right ) \text{Si}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.104045, size = 65, normalized size = 0.83 \[ \frac{-\cos \left (2 a-\frac{2 b c}{d}\right ) \text{CosIntegral}\left (\frac{2 b (c+d x)}{d}\right )+\sin \left (2 a-\frac{2 b c}{d}\right ) \text{Si}\left (\frac{2 b (c+d x)}{d}\right )+\log (c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x]^2/(c + d*x),x]

[Out]

(-(Cos[2*a - (2*b*c)/d]*CosIntegral[(2*b*(c + d*x))/d]) + Log[c + d*x] + Sin[2*a - (2*b*c)/d]*SinIntegral[(2*b
*(c + d*x))/d])/(2*d)

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 105, normalized size = 1.4 \begin{align*}{\frac{\ln \left ( \left ( bx+a \right ) d-da+cb \right ) }{2\,d}}-{\frac{1}{2\,d}{\it Si} \left ( 2\,bx+2\,a+2\,{\frac{-da+cb}{d}} \right ) \sin \left ( 2\,{\frac{-da+cb}{d}} \right ) }-{\frac{1}{2\,d}{\it Ci} \left ( 2\,bx+2\,a+2\,{\frac{-da+cb}{d}} \right ) \cos \left ( 2\,{\frac{-da+cb}{d}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(b*x+a)^2/(d*x+c),x)

[Out]

1/2*ln((b*x+a)*d-d*a+c*b)/d-1/2*Si(2*b*x+2*a+2*(-a*d+b*c)/d)*sin(2*(-a*d+b*c)/d)/d-1/2*Ci(2*b*x+2*a+2*(-a*d+b*
c)/d)*cos(2*(-a*d+b*c)/d)/d

________________________________________________________________________________________

Maxima [C]  time = 1.23145, size = 216, normalized size = 2.77 \begin{align*} \frac{b{\left (E_{1}\left (\frac{2 i \, b c + 2 i \,{\left (b x + a\right )} d - 2 i \, a d}{d}\right ) + E_{1}\left (-\frac{2 i \, b c + 2 i \,{\left (b x + a\right )} d - 2 i \, a d}{d}\right )\right )} \cos \left (-\frac{2 \,{\left (b c - a d\right )}}{d}\right ) + b{\left (-i \, E_{1}\left (\frac{2 i \, b c + 2 i \,{\left (b x + a\right )} d - 2 i \, a d}{d}\right ) + i \, E_{1}\left (-\frac{2 i \, b c + 2 i \,{\left (b x + a\right )} d - 2 i \, a d}{d}\right )\right )} \sin \left (-\frac{2 \,{\left (b c - a d\right )}}{d}\right ) + 2 \, b \log \left (b c +{\left (b x + a\right )} d - a d\right )}{4 \, b d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)^2/(d*x+c),x, algorithm="maxima")

[Out]

1/4*(b*(exp_integral_e(1, (2*I*b*c + 2*I*(b*x + a)*d - 2*I*a*d)/d) + exp_integral_e(1, -(2*I*b*c + 2*I*(b*x +
a)*d - 2*I*a*d)/d))*cos(-2*(b*c - a*d)/d) + b*(-I*exp_integral_e(1, (2*I*b*c + 2*I*(b*x + a)*d - 2*I*a*d)/d) +
 I*exp_integral_e(1, -(2*I*b*c + 2*I*(b*x + a)*d - 2*I*a*d)/d))*sin(-2*(b*c - a*d)/d) + 2*b*log(b*c + (b*x + a
)*d - a*d))/(b*d)

________________________________________________________________________________________

Fricas [A]  time = 1.70157, size = 238, normalized size = 3.05 \begin{align*} -\frac{{\left (\operatorname{Ci}\left (\frac{2 \,{\left (b d x + b c\right )}}{d}\right ) + \operatorname{Ci}\left (-\frac{2 \,{\left (b d x + b c\right )}}{d}\right )\right )} \cos \left (-\frac{2 \,{\left (b c - a d\right )}}{d}\right ) - 2 \, \sin \left (-\frac{2 \,{\left (b c - a d\right )}}{d}\right ) \operatorname{Si}\left (\frac{2 \,{\left (b d x + b c\right )}}{d}\right ) - 2 \, \log \left (d x + c\right )}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)^2/(d*x+c),x, algorithm="fricas")

[Out]

-1/4*((cos_integral(2*(b*d*x + b*c)/d) + cos_integral(-2*(b*d*x + b*c)/d))*cos(-2*(b*c - a*d)/d) - 2*sin(-2*(b
*c - a*d)/d)*sin_integral(2*(b*d*x + b*c)/d) - 2*log(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin ^{2}{\left (a + b x \right )}}{c + d x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)**2/(d*x+c),x)

[Out]

Integral(sin(a + b*x)**2/(c + d*x), x)

________________________________________________________________________________________

Giac [C]  time = 1.2331, size = 826, normalized size = 10.59 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)^2/(d*x+c),x, algorithm="giac")

[Out]

1/4*(2*log(abs(d*x + c))*tan(a)^2*tan(b*c/d)^2 - real_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)^2*tan(b*c/d)^
2 - real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a)^2*tan(b*c/d)^2 + 2*imag_part(cos_integral(2*b*x + 2*b*c/d
))*tan(a)^2*tan(b*c/d) - 2*imag_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a)^2*tan(b*c/d) + 4*sin_integral(2*(b
*d*x + b*c)/d)*tan(a)^2*tan(b*c/d) - 2*imag_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)*tan(b*c/d)^2 + 2*imag_p
art(cos_integral(-2*b*x - 2*b*c/d))*tan(a)*tan(b*c/d)^2 - 4*sin_integral(2*(b*d*x + b*c)/d)*tan(a)*tan(b*c/d)^
2 + 2*log(abs(d*x + c))*tan(a)^2 + real_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)^2 + real_part(cos_integral(
-2*b*x - 2*b*c/d))*tan(a)^2 - 4*real_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)*tan(b*c/d) - 4*real_part(cos_i
ntegral(-2*b*x - 2*b*c/d))*tan(a)*tan(b*c/d) + 2*log(abs(d*x + c))*tan(b*c/d)^2 + real_part(cos_integral(2*b*x
 + 2*b*c/d))*tan(b*c/d)^2 + real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(b*c/d)^2 + 2*imag_part(cos_integral(
2*b*x + 2*b*c/d))*tan(a) - 2*imag_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a) + 4*sin_integral(2*(b*d*x + b*c)
/d)*tan(a) - 2*imag_part(cos_integral(2*b*x + 2*b*c/d))*tan(b*c/d) + 2*imag_part(cos_integral(-2*b*x - 2*b*c/d
))*tan(b*c/d) - 4*sin_integral(2*(b*d*x + b*c)/d)*tan(b*c/d) + 2*log(abs(d*x + c)) - real_part(cos_integral(2*
b*x + 2*b*c/d)) - real_part(cos_integral(-2*b*x - 2*b*c/d)))/(d*tan(a)^2*tan(b*c/d)^2 + d*tan(a)^2 + d*tan(b*c
/d)^2 + d)